package services.expertInfo;

import base.IBaseServicesWithoutBLOBs;
import wt.entity.expertInfo.BaseExpertInfo;

import java.util.List;

/**
 * Created by Administrator on 2017/10/14.
 */
public interface IBaseExpertInfoServices<Record extends BaseExpertInfo,RecordExample>  extends IBaseServicesWithoutBLOBs<Record,RecordExample> {

    /**
     * 专家修改信息
     * @param record
     * @throws Exception
     */
    void expertUpdateByPrimaryKeySelective(Record record) throws Exception;
    /**
     * 专家添加信息
     * @param record
     * @throws Exception
     */
    void expertInsertSelective(Record record) throws Exception;

    /**
     * 专家删除信息
     * @param id
     * @throws Exception
     */
    void expertDeleteByPrimaryKey(String id) throws Exception;

    /**
     * 专家获取所有信息
     * @return
     * @throws Exception
     */
    List<Record> expertSelectByExpertId(String expertId) throws Exception;

    /**
     * 专家获取指定信息
     * @return
     * @throws Exception
     */
    Record  expertSelectByPrimaryKey(String id) throws Exception;

    /**
     * 专家撤销编辑申请
     * @param id
     * @throws Exception
     */
    int expertCancelApplyByPrimaryKey(String id) throws Exception;

    /**
     * 管理员修改信息
     * @param record
     * @throws Exception
     */
    void adminUpdateByPrimaryKeySelective(Record record) throws Exception;

    /**
     * 管理员添加信息
     * @param record
     * @throws Exception
     */
    void adminInsertSelective(Record record) throws Exception;
    /**
     * 管理员批量添加信息
     * @param recordList
     * @throws Exception
     */
    void adminInsertSelective(List<Record> recordList) throws Exception;

    /**
     * 管理员删除信息
     * @param id
     * @throws Exception
     */
    void adminDeleteByPrimaryKey(String id) throws Exception;

    /**
     * 管理员根据专家的id获信息所有信息
     * @return
     * @throws Exception
     */
    List<Record> adminSelectByExpertId(String  expertId) throws Exception;

    /**
     * 管理员核查专家信息
     * @return
     * @throws Exception
     */
    void adminCheckApplyByPrimaryKey(String id, boolean result, String reason) throws Exception;


    /**
     * 检测专家是否有专业还未审核
     * @param expertId
     * @return
     * @throws Exception
     */
    boolean isExistUnauditedRecord(String expertId) throws Exception;
}
